package cn.maxhou.service.impl;

import cn.maxhou.entity.Storage;
import cn.maxhou.mapper.StorageMapper;
import cn.maxhou.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service("storageService")
public class StorageServiceImpl implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Transactional
    @Override
    public int insert(Storage record) {
        return storageMapper.insert(record);
    }

    @Transactional
    @Override
    public int deleteById(Integer id) {
        return storageMapper.deleteById(id);
    }

    @Transactional
    @Override
    public int update(Storage record) {
        return storageMapper.update(record);
    }
}
